<?php
class Zend_View_Helper_showTableProductCategory {

    public function showTableProductCategory($view) {
        
        $arrProductcategory = $view->arrProductcategory; 
        $arrProduct = $view->arrProduct;
        $arrCategory = $view->arrCategory;
        
        $strHtml = '';
        $strHtml .= '<table class="hovertable">';
        $strHtml .= '<tr>';
        $strHtml .= '<th>sản phẩm</th>';
        $strHtml .= '<th>category</th>';
        $strHtml .= '<th>thao tác</th>';
        $strHtml .= '</tr>';
        if(isset($arrProductcategory))
        foreach ($arrProductcategory as $Productcategory) {
            
            $strHtml .= '<tr id="tablerow">';
            $strHtml .= '<td>'. $arrProduct[$Productcategory->product_id] .'</td>';
            $strHtml .= '<td>'. $arrCategory[$Productcategory->category_id] .'</td>';
            $strHtml .= '<td>
                             <a class="icon-1" href="'.$view->baseUrl().'/productcategory/edit/id/'.$Productcategory->product_category_id.'"/>
                             <a class="icon-2" href="'.$view->baseUrl().'/productcategory/delete/id/'.$Productcategory->product_category_id.'"/>
                             </td>';
            $strHtml .= '</tr>';
        }
        
        $strHtml .= '</table>';
        return $strHtml ;
    }
}